<?php
if (!defined('IN_IA')) {
	exit('Access Denied');
}
class Welian_Indiana_Order {
	function getOrdersById($id){
		global $_W;
		$condition =  "and uniacid = :uniacid";
		$params = array(':uniacid' => $_W['uniacid']);
		$sql = "SELECT * FROM " . tablename('ew_delivery_order') . " where 1 {$condition} and id='{$id}'";
		$orders = pdo_fetch($sql, $params);
		return $orders;
	}

	function getOrdersByOrderId($orderId){
		global $_W;
		$condition =  "and uniacid = :uniacid";
		$params = array(':uniacid' => $_W['uniacid']);
		$sql = "SELECT * FROM " . tablename('ew_delivery_order') . " where 1 {$condition} and orderId='{$orderId}'";
		$orders = pdo_fetch($sql, $params);
		return $orders;
	}

}
